 package com.demo.helloworld.dao.mp;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.demo.helloworld.bo.Person;
 import com.demo.helloworld.dao.PersonDAO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 
 
 
 /**
  * 请使用 @Component 注解，MP层在dao层之下
  *
  */
 @Component
 public class PersonMP
 {
   @Autowired
   private PersonDAO dao;
   
   public IPage selectPage(int startPage)
   {
     Page<Person> page = new Page(startPage, 2L);
     IPage<Person> userList = this.dao.selectPage(page, null);
     return userList;
   }
 }
